<template>
  <div>
    <router-link :to="{path:'/lytzym',query:{name:'路由query传参'}}">路由跳转页面</router-link>
  </div>
</template>

<script>
import { reactive, ref, toRefs } from "vue";
export default {
  name: "路由跳转",
  // 定义模板
  components: {},
  //在创建组件之前执行
  setup(props, context) {
    const state = reactive({
      name: "你好",
    });
    const num = ref(0);
    return {
      ...toRefs(state),
      num,
    };
  },
};
</script>
<style scoped lang ='less'>
</style>